initialize

open fun initialize(module: Module)

Initializes the control with its associated module context.

This method is typically called once before the control is first used or made active. It allows the control to set up its internal state, resources, and prepare for operation based on the provided data.

If #isAutoStart() is true, implementations might also trigger their start logic within or immediately after initialization.

Initializes the TextView using settings from the provided com.reveldigital.player.api.Module. This involves:

  • Parsing Option values for "ForeColor", "Alignment", "Text", "FontFamily", and "DropShadowEffect".
  • Setting up child views (either an androidx.appcompat.widget.AppCompatTextView for native rendering or an ImageView for image rendering) based on the useNativeRendering flag.
  • Applying layout parameters based on the "Alignment" option.
  • For native rendering, it configures auto-sizing text.
  • For image rendering, it initiates the download of the rendered text image.

Parameters

module

The module data containing configuration options for the text view. This is typically the same module instance passed during construction but is re-asserted here as per the RevelControl interface.